
        <{foreach from=$data.pic item=parent key=parentId}>
		<a class="main-banner" href="<{$parent.linktarget}>">
			<img  class="lazyOwl" data-src="<{$parent.link}>" alt="<{$data.linkinfo}>" title="<{$data.linkinfo}>" />
			<{if $parent.usetimer == 1}>
			<div class="clock-<{$parent.id}>"></div>
			<script type="text/javascript">
				var need = "<{$parent.timer}>";
				need = need.split('-');
				needDate = new Date(need[2], (need[1]-1), need[0]);
				needDate = needDate.getTime() / 1000;
				
			var clock;
			
				// Grab the current date
				var currentDate = new Date();

				// Set some date in the future. In this case, it's always Jan 1
				var futureDate  = new Date(currentDate.getFullYear() + 1, 0, 1);
				
				// Calculate the difference in seconds between the future and current date
				var diff = needDate - currentDate.getTime() / 1000;  //Це UNIX Время
				
				if(diff > 0){
					// Instantiate a coutdown FlipClock
					clock = jQuery('.clock-<{$parent.id}>').FlipClock(diff, {
						clockFace: 'DailyCounter',
						countdown: true,
						language:'ru-ru'
					});
				}
				else{
					jQuery('.clock-<{$parent.id}>').html("<p class='timer-end'>К сожалению, акция закончилась</p>");
				}
			</script>	
			<{/if}>
		</a>
		
        <{/foreach}>
		
		

     <!--   <{assign var=countnum value="1"}>
        <{foreach from=$data.pic item=parent key=parentId}>
       <{$countnum++}>
        <{/foreach}>  -->
